#ifndef __TIMER_H__
#define __TIMER_H__

#include "util/util_config.h"
#include <ctime>
#include <thread>

NS_UTIL_BEGIN

class Timer
{
protected:
	clock_t t0;
	clock_t t1;

public:
	void tic();
	double toc();	// return elapsed time from t0
};

void sleep(double second);	// precision at millisecond

NS_UTIL_END

#endif